<!DOCTYPE html>
<html>
	<head>
		<script>
			(function(window) {
				var Dictionary = function() {
					this.dataStore = new Array();
				}
				Dictionary.prototype = {
					add : function(key, value) {
						this.dataStore[key] = value;
					},
					find : function(key) {
						return this.dataStore[key];
					},
					remove : function(key) {
						delete this.dataStore[key];
					},
					showAll : function() {
						console.log(this.dataStore)
						for (var key in this.dataStore.sort()) {
							console.log(key + ">" + this.dataStore[key]);
						}
					}
				}
				window.Dictionary = Dictionary;
			})(window)
		</script>
	</head>
	<body>
		<script>
			var pbook = new Dictionary();
			pbook.add("Mike", "123");
			pbook.add("David", "234");
			pbook.add("Jason", "345");
			pbook.showAll();

			var a = {
				f : 1,
				s : 2,
				t : 3
			}
			console.log(a)
			for (var key in a) {
				console.log(a[key]);
			}
		</script>
	</body>
</html>